// components/InstallComponent/Explain/Explain.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    formList: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    headleUpward(e) { //向上
      let {
        index
      } = e.currentTarget.dataset
      this.triggerEvent('headleUpward', index)
    },
    headleDown(e) { //向下
      let {
        index
      } = e.currentTarget.dataset
      this.triggerEvent('headleDown', index)
    },

    headleAddContent(e) { // 添加内容
      let {
        index
      } = e.currentTarget.dataset
      this.triggerEvent('headleAddContent', parseInt(index))
    },

    headleDelete(e) { //删除内容
      let {
        index
      } = e.currentTarget.dataset
      this.triggerEvent('headleDelete', index)
    },

    headleRemoveImg(e) { //删除小图
      let i = e.currentTarget.dataset
      this.triggerEvent('headleRemoveImg', i)
    },


    headleFormInput(e) { //文字输入
      let {
        index
      } = e.currentTarget.dataset
      let {
        value
      } = e.detail
      let data = {
        value,
        index
      }
      this.triggerEvent('headleFormInput', data)
    },


    headleMinDrawing(e) { //小图添加
      let {
        index
      } = e.currentTarget.dataset
      this.triggerEvent('headleMinDrawing', index)
    },



    headlePreview(e) { //图片预览
      let data = e.currentTarget.dataset
      this.triggerEvent('headlePreview', data)
    }
  }
})